import type { TFilterValue } from "@/types";
import { http } from "@/utils/fetch";

export const CUSTOMER_FIND_ALL = "/customer/findAll";

/**
 * 获取客户列表
 * @param currentPage 当前页数
 * @param pageSize 分页容量
 * @param filterValue 筛选 DTO
 * @returns
 */
export const getCustomerList = async (currentPage: number, pageSize: number, filterValue?: TFilterValue) => {
  return await http("POST", `${CUSTOMER_FIND_ALL}?page=${currentPage}&pageSize=${pageSize}`, filterValue);
};
